/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


function clone(obj){
    if(obj == null || typeof(obj) != 'object')
        return obj;

    var temp = new Object; // changed

    for(var key in obj)
        temp[key] = clone(obj[key]);
    return temp;
}